home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 26 / 026.d81 / t.r_s restore < prev    next >
Text File  |  2022-08-26  |  2KB  |  109 lines

  1.  
  2.  
  3. DEFINING the RUN/STOP and RESTORE KEYS
  4.                  by
  5.             John Kottler
  6.  
  7.  
  8. COMMODORE MICROCOMPUTERS MAGAZINE
  9. July/August, 1986
  10. p. 96
  11.  
  12. **************************************
  13. NOTE: Because of the nature of this
  14. program, it cannot be run from the
  15. Loadstar operating system.  To run
  16. this program, exit Loadstar and type:
  17.  
  18.     LOAD"R/S RESTORE",8  [RETURN]
  19.  
  20.     RUN   [RETURN]
  21.  
  22. **************************************
  23.  
  24.  
  25.   A good feature to have in many
  26.  
  27. kinds of programs is a "pause"
  28.  
  29. feature-- one that allows the user to
  30.  
  31. stop the program by pressing the
  32.  
  33. RUN/STOP key and then continue by
  34.  
  35. pressing RUN/STOP a second time.
  36.  
  37.  
  38.   As you might expect, this is easier
  39.  
  40. said than done-- after all, how can
  41.  
  42. the computer test to see if the
  43.  
  44. RUN/STOP key has been activated when
  45.  
  46. that key automatically stops the
  47.  
  48. program?  The first step is to disable
  49.  
  50. the RUN/STOP key using POKE 808,234.
  51.  
  52.  
  53.   With the STOP key disabled, we can
  54.  
  55. check for someone pressing it with:
  56.  
  57.  
  58.   IF PEEK(197)=63 THEN (PAUSE).
  59.  
  60.  
  61.   John Kottler's "Program 1"
  62.  
  63. does the necessary programming work
  64.  
  65. for you-- it POKEs a machine language
  66.  
  67. program disabling the RUN/STOP key and
  68.  
  69. then automatically runs a second demo
  70.  
  71. program.  When you run the second
  72.  
  73. program, you will see that pressing
  74.  
  75. the RUN/STOP key will cause the
  76.  
  77. program to "pause".
  78.  
  79.  
  80.   To run "Program 1" with your own
  81.  
  82. programs you must first delete Line
  83.  
  84. 35.  (To delete the line, load
  85.  
  86. "Program 1", type "35" --no quotes--
  87.  
  88. and press RETURN.
  89.  
  90.  
  91.   If you want to learn more about the
  92.  
  93. ins and outs of adding pause features
  94.  
  95. to your programs, be sure to check out
  96.  
  97. Kottler's article in the
  98.  
  99. MICROCOMPUTERS magazine cited at the
  100.  
  101. beginning of this article.
  102.  
  103.  
  104. DISK FILES USED:
  105.  
  106. R/S RESTORE
  107.  
  108. -----------< end of text >------------
  109.